<? include "./configs/session_check.php";
include "./configs/config.php";
$userid=$_SESSION['userid'];
$ProjectID=$_POST['id'];
$project_query=mysql_query("SELECT * FROM Tasks WHERE ProjectID='$ProjectID'");
$task_number=mysql_num_rows($project_query);
if($task_number > 0){
?>

	<table class="fancy fullwidth">
						<thead>
							<tr>
                            	<th>TaskID</th>
								<th>Project ID</th>
								<th>Assign To</th>
								<th>Task Title</th>                                
								<th>Line Manager</th>
								<th>Status</th>
								
							</tr>
						</thead>
						<tbody>
                        <?
						
						while($project_data=mysql_fetch_array($project_query)){
						?>
							<tr class="odd">
								<td><?=$project_data['TaskID']?><a href="TaskDetails.php?id=<?=$project_data['TaskID']?>" title="Project Details" class="tooltip table_icon"><img src="./assets/icons/actions_small/pencil.png" alt="" /></a></td>
								<td><?=$project_data['ProjectID']?></td>
								<td><?=$project_data['AssigneTo']?></td>
								<td><?=$project_data['TaskTitle']?></td>
								<td><?=$project_data['LineManager']?></td>
								<td><? if($project_data['Pause'] == 1)
								echo "Paused";
								else
								echo "Active";
								?></td>
							</tr>
						<?
						}
						?>
						
						</tbody>
					</table>
                    <?
}
				else{
					?>
                    <div class="notification info"> 
						
						<div class="text"> 
							<p><strong>No Task Found!</strong> </p> 
						</div> 
					</div> 
                    <?
					}
					?>